<?php
/**
 * Created by a front-end programmer.
 * User: Xwen
 * Date: 2018/3/5
 * Time: 13:16
 * Mail:lauwencn@gmail.com
 */
class CategoryController extends CommonController {
    public function index(){
        $page = isset($_GET['page']) ? $_GET['page'] : 1;

        $data = K("Article")->where('Category_cid='.$_GET['cid'])->order('sendtime asc')->pagination($page, 3);
        $articleData = $data['returnData'];
        $this->assign('articleData', $articleData);
        $this->assign('data', $data);

        $this->display();
    }
}
?>